1. Field of Use
The method and apparatus of the present invention generally relates to data processing system analyzers and more particularly to a method of attaching a software analyzer to a data processing system having the central processing unit (CPU) connected to the memory and other peripheral devices by a common input/output bus. This invention relates to the detection of use of the common bus by the CPU; and more specifically to detecting such use by monitoring the priority level of the devices that are requesting access to the common bus.
2. Description of the Prior Art
Current methods for analyzing the operation for data processing systems include various methods for extracting data or monitoring the performance of the data processing system in operation. These data processing system analyzers may be broken down into two categories; hardware analyzers and software analyzers.
The purpose of a hardware analyzer is to monitor and analyze the various aspects of the operation of the data processing system hardware. For example, a hardware analyzer may monitor various timings within the CPU or transfer of information between units connected to a bus. For example, the hardware analyzer may monitor the time that it takes for the memory to respond to a CPU request for reading a word from memory with this time being the average time reflecting those cases in which the memory is immediately available for reading and those cases which the reading is deferred because the memory is busy performing a data transfer to a peripheral device. Hardware analyzers are also used to determine utilization factors, for example, the percentage of time that the CPU is being utilized, as compared to the percentage of time the CPU is idle, waiting for either data from memory or the completion of an input/output operation. The hardware analyzer may also be used to determine utilization facts and response times for various components within the system, such as peripheral devices, and memory subsystems. The data provided by the hardware analyzer may be used in various ways. For example, the diagnosis of system design problems or the optimization of system configurations as a data processing system is either contracted or expanded by the addition or removal of equipment in response to optimizing system for an existing data processing workload or to accommodate a changing data processing workload.
Current methods of performing hardware analysis of a data processing operation require a detailed knowledge of the hardware of the data processing system to be analyzed so that the hardware analyzer may be connected to points within the data processing system such that various hardware signals can be monitored to provide the data required for a hardware analysis. The ease with which the hardware analyzer may be connected to a data processing system will vary from system to system and will also depend upon whether monitoring or probe points have been designed into the system. Current hardware analyzers often require connecting monitoring signal wires to various pins of components mounted on printed circuit boards so that the signals may be monitored in order to collect the required data.
The purpose of a software analyzer is to analyze the operation of the software programs as they execute in the data processing system. The software analyzer may be used to monitor accesses to a specified memory location, monitor access to a specified peripheral device, monitor the setting of a specified bit within a memory word, monitor the execution of the program at a specified hardware priority level, or perform a trace of the execution of a software program. The software analyzer functions may be performed during the debugging of the software systems, for example, in attempting to determine who is inadvertently destroying data in a specified location, or for optimizing the software program by determining where in an operating system the largest bulk of time is being spent such that that particular section of code may be recoded to execute faster.
These software analyzer functions may be performed either; by modifying the software which is to be analyzed to include various analysis routines, by use of various hardware features built into the data processing system on which the software to be analyzed is to be executed, or by a software analyzer which is attached to the data processing system, or by a combination of these methods. For example, if the software analyzer is to analyze the amount of time in which the CPU is idle waiting for the completion of a input/output operation, the idle loop within the operating system may be modified to include a counter within the idle loop such that the counter is incremented each time the idle loop is executed. This count can then be used in determining the amount of time in which the operating system is spent in the idle loop out of the total elapsed time. A further example is that the routine within the operating system which changes the priority level in which the software is executing can be modified to collect data each time the priority level is changed. Modifications of this kind which require the insertion of data collection or probe points within the software which is to be analyzed, require detailed knowledge of the software in order to insert these probe points and data collection of points. This technique also has the disadvantage that, in many cases, the operation of the system being analyzed is changed due to the increased execution time required to perform the data collection for software analysis.
Hardware features built into the central processor system may also be used to perform the software analysis function. For example, if it is desired to determine who is changing a specified memory location, the memory location or the block in which it is contained may be write protected, if the system has that capability, and a routine written such that every time a memory write violation is detected, an analysis is to be made as to whether the memory location is the specific location which is to be monitored. The routine would then collect the data as to the location of the instruction attempting to write into the specified location. Also, if the particular CPU has the ability to trap or interrupt upon the execution of each jump or branch software instruction, a routine may be written to monitor the jump/branch trap/interrupt. This routine can then be used to analyze which program location was attempting to perform the jump/branch instruction to the specified location.
Alternatively, equipment may be attached to the data processing system to monitor and analyze the execution of software within the system. In this case, the equipment would be attached to the data processing system at various probe points similar to that used for a hardware monitor and the system operation monitored and analyzed by use of the signals collected at these probe points. This method, in which the equipment is attached to the data processing system, has the advantage that the analysis of the software system can usually be done without the observation interfering or changing the execution of the software within the system. This use of additional equipment to monitor the software also has the additional advantage that it is generally independent of the particular operating system software which is to monitored. This method generally requires detailed knowledge of the data processing system hardware, but the detailed knowledge required if various software probe points are to be inserted within the operating system software is not required.
A problem in attaching any kind of a monitor/analyzer to a data processing system, be it for analyzing the software execution or the hardware operation, is to attach the analyzer to the system as conveniently as possible. In the past, in which discreet components were used within data processing systems and in which electronics packaging was not as dense as it is using modern integrated circuits, probe points could be attached to the data processing system by means of clipping onto the leads of various components mounted on the printed circuit boards. In the past, these printed circuit boards were spaced within the system such that the analyzer probes could be connected to the system while the printed circuit boards were enclosed within the data processing system cabinets. However, with the advent of integrated circuits and current packaging densities, it is often difficult, if not impossible, to have probes connected to points on a printed circuit board while the printed circuit board is in its normal operating position. In many cases, because of signal propagation time constraint, the system cannot operate at normal speeds while the printed circuit boards are connected by an extender card which would allow the probes to be connected.
Therefore, what is needed is a method by which a monitor/analyzer can be connected to a data processing system with ease without affecting the operation of the function being monitored or analyzed.